#ifndef XPARTICLE_H
#define XPARTICLE_H

#include <XMain.h>
#include <XSprite.h>

#ifdef XEXPORTING
#define XEXPORT_DLL __declspec(dllexport)
#else
#define XEXPORT_DLL __declspec(dllimport)
#endif

class XEXPORT_DLL XParticle
{
private:
	int DurationTime;
	int LastUpdate;

	XColor CurrentColor;
	XVector CurrentTranslation;
	int CurrentRotation;
	float CurrentScale;

	XColor ChangeColor;
	XVector ChangeTranslation;
	int ChangeRotation;
	float ChangeScale;

	XRectangle SpriteClip;
	XSprite* Sprite;
	XTexture* Texture;
public:
	XParticle(int time, int duration, XSprite* sprite, XTexture* texture);
	~XParticle();

	void SetCurrent(XColor color, XVector vec, int rotation, float scale);
	void SetChange(XColor color, XVector vec, int rotation, float scale);

	void Update(int time);
	void Draw();

	friend class XParticleEmiter;
	friend class XFireEmiter;
};


#endif